-
Notifications
You must be signed in to change notification settings - Fork 277
Construct and_exprt in a non-deprecated way #3786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
06eb157
to
f904bcc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: f904bcc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97160884
src/solvers/flattening/functions.cpp
Outdated
@@ -35,18 +35,17 @@ exprt functionst::arguments_equal(const exprt::operandst &o1, | |||
if(o1.empty()) | |||
return true_exprt(); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The if above can go away; conjunction() takes care of this.
and_exprt result; | ||
result.operands()=op; | ||
return std::move(result); | ||
return and_exprt(exprt::operandst(op)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cast appears to be redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's necessary to as the and_exprt
constructor wants an rvalue reference.
The default constructor is deprecated. To facilitate construction with an arbitrary number of operands a new constructor taking a initializer list is added.
f904bcc
to
4819fda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 4819fda).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/97277964
The default constructor is deprecated. To facilitate construction with an
arbitrary number of operands a new constructor taking a initializer list is
added.